from flask import Flask, render_template, request

app = Flask(__name__)
app.config['SECRET_KEY'] = 'demo5'


@app.route('/')
def form():
    return render_template('form.html')


@app.route('/submit', methods=['POST'])
def submit():
    username = request.form.get('username')
    email = request.form.get('email')
    return f"用户名：{username},电子邮件：{email}"


if __name__ == '__main__':
    app.run(debug=True)
